// index.js
Page({
  data: {

  },
  onLoad() {
    // 调用轮播图数据
    this.getSwiper()
    //调用导航数据
    this.getNav()
    //调用楼层数据
    this.getFloor()

  },

  // 轮播图封装
  async getSwiper() {
    const { data } = await wx.homeApi.getSwiperData();
    console.log(data);
    this.setData({
      swiperList: data.message
    })
  },

  //导航封装
  async getNav() {
    const { data } = await wx.homeApi.getCatitems();
    this.setData({
      navList: data.message
    })
  },

  //楼层封装
  async getFloor() {
    const { data } = await wx.homeApi.getFloordata()
    this.setData({
      floorList: data.message
    })
  },



})
